<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<!-- {literal}
<script language="javascript">
function prnbutt_onclick() { 
	window.print(); 
	document.getElementsById('print2').style.display='none';
	return true; 
} 

function window_onbeforeprint() { 
	prn.style.visibility ="hidden"; 
	return true; 
} 

function window_onafterprint() { 
	prn.style.visibility = "visible"; 
	return true; 
} 
</script> -->
<!-- {webcontrol type='LoadJsCss' src="Resource/Script/jquery.js"} -->
<script language="javascript" src="Resource/Script/jquery.js"></script>
<!-- {webcontrol type='LoadJsCss' src="Resource/Script/Print/2017.01.04/LodopFuncs.js"} -->
<script language="javascript" src="Resource/Script/Print/2017.01.04/LodopFuncs.js"></script>
 <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop.exe"></embed>
    <param name="CompanyName" value="常州易奇信息科技有限公司">
    <param name="License" value="664717080837475919278901905623">
  </object> 

<script language="javascript" src="Resource/Script/jquery.js"></script>
<script language="javascript" src="Resource/Script/Common.js"></script>
<script language="javascript">
var LODOP; //声明为全局变量
$(function(){
        
});
  var LODOP; //声明为全局变量

  function PrintTable(){
    //加载打印控件
    LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));
    //设置纸张  
    //LODOP.SET_PRINT_PAGESIZE(0,'203mm','290mm','A4')
    LODOP.PRINT_INIT("易奇科技报表打印");
    LODOP.SET_PRINT_PAGESIZE(0,'215mm','280mm','');
    //设置居中显示LODOP.ADD_PRINT_HTM(Top,Left,Width,Height,strHtml)
    //in(英寸)、cm(厘米) 、mm(毫米) 、pt(磅)、px(1/96英寸) 、%(百分比)，如"10mm"表示10毫米。
    LODOP.ADD_PRINT_HTM("0%", "0%", "100%", "100%", document.getElementById("printBox").innerHTML);
    LODOP.SET_PRINT_STYLEA(0,"Horient",2);
    //LODOP.ADD_PRINT_BARCODE(40,30,151,39,"",$('#barcode').attr('data-barcode'));
    //预览
    //LODOP.PRINT_DESIGN();
    LODOP.PREVIEW();    
  };
function loadPrint(){
    var auto={/literal}{$smarty.get.auto|@json_encode}{literal};
    if(auto==1)document.getElementById('button').click();
  }
</script>
<!-- {/literal} -->

</head>

<body onload="loadPrint()">

<div id="printBox" style="margin:0 auto; position:relative;">
{literal}
<style>
    #printBox{ margin:0 auto; position:relative;}
    .headDivContent{width: 100%;margin: 0 auto;text-align: center}
    .headMiddle{margin: 0 auto;font-size: 20px;margin-top: 20px}
    .footHead{margin: 0 auto;font-size: 20px;margin-top: 10px}
    .style1 {
        font-size: 14pt;
        font-weight: bold;
    }
    body {
        margin:0 auto;
    }
    #bodyDiv{ margin:0 auto; text-align:center;}
    #TblMainInfo{border-collapse:collapse; border:solid 1px black; }
    #TblMainInfo td {FONT-FAMILY:"宋体,Arial";FONT-SIZE:20px;COLOR:#000; border-bottom:solid 1px black; border-right:solid 1px black;text-align: center;}
    #TblMain td{FONT-FAMILY:"宋体,Arial";FONT-SIZE:20px;COLOR:#000; border-bottom:solid 1px black; border-right:solid 1px black;}
    .foot{ width:600px}
    .title {FONT-SIZE: 14pt}
    .tr {height:50px;}
    #hr{ text-align:center}
    /*打印按钮样式*/
    #divPrint { position:fixed; bottom:10px; right:250px;}
    #divPrint input {  background-color: #0362fd !important; border:0px; color: #fff !important; font-family: "Segoe UI",Helvetica,Arial,sans-serif;cursor: pointer; outline: medium none; font-size:14px; padding: 7px 14px;}
    .tablec tr td{
       border-bottom:1px solid #000;
       border-right:1px solid #000;
       height:80px;
       font-size: 13px;
       padding:0px 5px 0px 5px;   
       min-width: 100px;
       width: 100px;
       text-align: center;
       /*text-align: center;*/
    }
    .top td{
      border-top:1px solid #000;
      text-align: center;
    }
    .left{
      border-left:1px solid #000;
      text-align: center;
    }
    #barcode {
        position: absolute;
        top:1.4em;
    }
    .dd{page-break-after: always;}
    .aaa{text-align: left}
</style>
{/literal}
<div class="headDivContent">
    <div class="headMiddle">南通艾帛纺织有限公司</div>
    <div class="footHead">生产任务通知单</div>
</div>

<table border="0" cellspacing="0" cellpadding="0" id="TblMainInfo" style="margin-top: 10px;margin-left: 20px;">
    <tr>
        <td align="left" width="13%">客户：</td>
        <td colspan="4"  width="25%" align="left" class="aaa" style="text-align: left;">{if $row.Client.compName}{$row.Client.compName}{else}&nbsp;{/if}</td>
        <td align="left"  width="13%">订单号：</td>
        <td colspan="4"  width="25%" align="left" class="aaa" style="text-align: left;">{$row.orderCode}</td>
    </tr>
     <tr>
        <td align="left" width="13%">下单时间：</td>
        <td colspan="4"  width="25%" align="left" class="aaa" style="text-align: left;">{$row.dateOrder}</td>
        <td align="left"  width="13%">交货期：</td>
        <td colspan="4"  width="25%" align="left" class="aaa" style="text-align: left;">{$row.dateJiaohuo}</td>
    </tr>
    <tr><td colspan="10" align="left" class="aaa" style="text-align: left">原料供应：客户来纱</td></tr>
    <tr>
        <td width="5%" rowspan="2">客户单号</td>
        <td width="10%" rowspan="2">品规</td>
        <td width="10%" rowspan="2">颜色</td>
        <td width="10%" rowspan="2">本厂色号</td>
        <td width="10%" rowspan="2">客户色号</td>
        <td colspan="3" width="30%">重量（kg）</td>
        <!-- <td width="10%" rowspan="2">金&nbsp;额<br>（元）</td> -->
        <td width="10%" colspan="4">备注</td>
    </tr>
    <tr>
        <td>经纱</td>
        <td>纬纱</td>
        <td>小计</td>
        <td></td>
    </tr>
    {foreach from=$aRow item=item key=key}
     {foreach from=$item item=it key=k}
    <tr>
        <td>{$it.wareNameBc}</td>
        <td>{$it.wareName}</td>
        <td>{$it.color}</td>
        <td>{$it.kuanhao}</td>
        <td>{$it.colorNum}</td>
        <td>{$it.cntKgJ}</td>
        <td>{$it.cntKgW}</td>
        <td>{$it.cntKg}</td>
        <td colspan="3"></td>
        <!-- <td></td> -->
    </tr>
     {/foreach}
     <tr>
        <td>合计</td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td>{$item.0.heji}</td>
        <td colspan="3"></td>
        <!-- <td></td> -->
    </tr>
     {/foreach}
     <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <!-- <td>&nbsp;</td> -->
     </tr>
     <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <!-- <td>&nbsp;</td> -->
     </tr>
     <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <!-- <td>&nbsp;</td> -->
     </tr>
     <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <!-- <td>&nbsp;</td> -->
     </tr>

</table>
<!-- <div  style="width:98%; text-align:center;margin-top: 20px">
<input name="print" type="button"  onclick="return prnbutt_onclick()" id="prn" value="打&nbsp;&nbsp;印"/>
</div> -->

</div>
<div id="divPrint" class="wrap">
    <input type="button" name="button" id="button" value="打印" onclick="PrintTable()"/>
</div>
</body>
</html>
